package pta;

import java.util.Scanner;

/**
 * @author tmh
 * @date 2024/12/18 21:59
 * @description
 */
public class T7_5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int count = scanner.nextInt();
        int sum = 0;
        int temp=0;
        for (int i = 0; i < count; i++) {
            temp=temp*10+num;
            sum += temp;
        }
        System.out.println(sum);
    }
}
